package test;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Strplit {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println("input new name:");
        String newzuo = in.next();
        String qian=newzuo.substring(0,newzuo.lastIndexOf('.'));
        char a[]=qian.toCharArray();
        boolean t = true;
        for(char cc:a){
            //
            if(!(19968 <= cc && cc < 40869)){
                t=false;
                break;
            }
        }
//        byte[] a = qian.getBytes();

//        for (int i = 0; i < a.length; i++) {
//            if (a[i] > 0) {
//                t = false;
//                break;
//            }
//        }
        System.out.println(t);
        if(t){
            if(newzuo.endsWith(".rar")||newzuo.endsWith(".zip")){
                System.out.println("格式正确");
            }else{
                System.out.println("格式不对，后缀不对");
            }
        }else{
            System.out.println("格式不对,前面的不是中文");
        }
//        System.out.println("输入filena,e");
//        String str1 = in.next();
//        String str2 = in.next();
//        int count = 0;
//        for (int i = 0; i < str1.length(); ) {
//            int a = str1.indexOf(str2, i);
//
//            if (a == -1) {
//                break;
//            }
//            i = a + str2.length();
//            count++;
//        }
//        System.out.println(str2 + "在" + str1 + "中出现了" + count + "次");
    }
}
